/* SPDX-License-Identifier: GPL-2.0 */
/*
 * base from kernel 4.x.
 * Description: Synopsys Designware PCIe host controller driver
 */

#ifndef _PCIE_DESIGNWARE_LEGACY_H
#define _PCIE_DESIGNWARE_LEGACY_H
#include <linux/irq.h>
struct pcie_port;
struct pci_bus;
struct msi_desc;
struct msi_controller;
struct pci_dev;

irqreturn_t dw_handle_msi_irq_legacy(struct pcie_port *pp);
void dw_pcie_msi_init_legacy(struct pcie_port *pp);
void clear_irq_range_legacy(struct pcie_port *pp, unsigned int irq_base,
				unsigned int nvec, unsigned int pos);
int assign_irq_legacy(int no_irqs, struct msi_desc *desc,
							struct pcie_port *pp, int *pos);
int dw_msi_setup_irq_legacy(struct msi_controller *chip, struct pci_dev *pdev,
							struct msi_desc *desc);
int dw_msi_setup_irqs_legacy(struct msi_controller *chip, struct pci_dev *pdev,
				 int nvec, int type);
int dw_pcie_valid_config_legacy(struct pcie_port *pp, struct pci_bus *bus,
								int dev);
void dw_pcie_setup_rc_legacy(struct pcie_port *pp);
#endif
